package me.zhengjie.minbearwcs.dao.mission.inf;

import me.zhengjie.minbearwcs.entity.PO.wcs.mission.WcsMission;
import me.zhengjie.minbearwcs.entity.PO.wcs.mission.status.MissionStatus;
import me.zhengjie.minbearwcs.entity.PO.wcs.mission.type.MissionType;

import java.time.LocalDateTime;
import java.util.List;

public interface WcsMissionDao {
    boolean insert(WcsMission mission);

    List<WcsMission> selectAll();

    MissionStatus selectMissionStatusById(Integer id);

    boolean updateMissionStatusById(Integer id, String status);

    boolean deleteMissionById(Integer id);

    boolean updateStartTime(Integer id, LocalDateTime now);

    boolean updateMissionStatusByMissionId(String missionId, String status);

    String selectAssociatedDetailIdByMissionId(String missionId);

    boolean updateMissionStatusByOrderCodeAndDetailId(String orderCode, Integer detailId, String status);

    WcsMission selectWcsMission(String orderCode,String missionType,String missionStatus,String associatedDetailId);


    WcsMission selectByMissionId(String missionId);

    WcsMission selectByOrderCodeAndDetailId(String orderCode, Integer detailId);

    List<WcsMission> selectByMissionType(MissionType missionType);

    List<WcsMission> selectByOrderCodeAndMissionType(String orderCode,MissionType missionType);
}
